import requests
"""
server.py
import flask
app= flask.Flask(__name__)
@app.route('/')
def index():
    html_content = \"\"\"
    <html>
    <body>
    <h1>Hello World!</h1>
    </body>
    </html>
    \"\"\"
    return html_content

@app.route('/test500')
def test500():
    raise Exception("This is a test exception for 500 error.")

@app.route('/test404')
def test404():
    return flask.abort(404)

if __name__ == '__main__':
    app.run(debug=True, host='0.0.0.0', port=5000)
"""
if __name__ == '__main__':
    response = requests.get('http://localhost:5000/')
    print("Response from /:")
    print(response.text)

    response = requests.get('http://localhost:5000/test500')
    print("\nResponse from /test500:")
    print(response.status_code, response.text)

    response = requests.get('http://localhost:5000/test404')
    print("\nResponse from /test404:")
    print(response.status_code, response.text)